function taskExerciseList(state = [], action) {
    switch (action.type) {
        case 'SET_TASK_EXERCISE_LIST':
            return action.payload;
        case 'ADD_TASK_EXERCISE_ITEM':
            return state.concat(action.payload);
        case 'DEL_TASK_EXERCISE_ITEM':
            return state.filter(item =>  item.id !== action.payload);
        case 'GET_TASK_EXERCISE_ITEM':
            return state;
        case 'EMPTY_TASK_EXERCISE':
            return action.payload;
        default:
            return state
    }
}
export default taskExerciseList;
